A diagram editor is a development environment that automatically generates visual graphs for users. Microsoft® Visio is a more commonly used diagram editor among the existing ones and it allows the users to edit graphic objects and connection relations therebetween in a mouse drag and drop manner. After the graphic objects and the connection relations therebetween are determined, a graph can be automatically generated, and then the users may either manually adjust the graphic objects in the generated graph or only manually arrange the graphic objects in the graph thereby to generate a graph with a desired layout. Generally, the graph layout refers to how to arrange a plurality of objects with specified geometrical shapes within a limited space based on the specified requirements. The graph layout is one of the elements of graph design. Whether the graph layout is reasonable significantly influences the actual effect of a graph.
A plurality of layout algorithms are available in the prior art, and these algorithms are very useful for representing the relations between graphic objects and can calculate positions of connection lines, positions of nodes or both so as to generate a visual graph that for example presents data. FIG. 1A-FIG. 1B show schematic examples of graph layouts that can be carried out using the existing diagram editors. The results obtained from the existing layout algorithms fail to completely satisfy the users' needs. FIG. 2 is a schematic representation of a visual graph of an order processing flow generated using the existing diagram editors. According to this figure, all graphic objects are uniformly distributed without crossings of connection lines, but it cannot be found therefrom which path or paths are primary path or paths and which paths are secondary paths. The reason is that the existing algorithms do not consider semantic meanings of the graphic objects while all the graphic objects are merely treated as plain boxes. In other words, the purpose of the existing algorithms is graphics-oriented and they intend to optimize some visual metrics, such as the number of crossings of connection lines, the distribution uniformity of graphic objects, etc. However, the above-mentioned visual metrics may not be the metrics the users care most. For example, the commonly used industrial flow diagrams usually have tens of or even hundreds of possible processing paths and different users may care the practical execution conditions of different paths instead of the visual effect of the complete flow diagram. Taking the physical distribution system as an example, the transportation department cares which transport path is the most commonly used, while the storage department cares which articles are imported and exported most frequently into and out of repository, so that the primary paths different departments expect to view in a graph are obviously different.